
#include "stm32f10x.h"
#include "delay.h"

#define SRC_LED1_OFF GPIO_SetBits  (GPIOC,GPIO_Pin_13);
#define SRC_LED1_ON  GPIO_ResetBits(GPIOC,GPIO_Pin_13);

int main(void)
{
    u8 i;
    GPIO_InitTypeDef def;

    Delay_Init();
    RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE);	 //使能PC端口时钟

    def.GPIO_Pin = GPIO_Pin_13;				 //LED0-->PC.13 端口配置
    def.GPIO_Mode = GPIO_Mode_Out_PP; 		 //推挽输出
    def.GPIO_Speed = GPIO_Speed_50MHz;		 //IO口速度为50MHz
    GPIO_Init(GPIOC, &def);	

    for(i = 0; i < 4; i++)
    {
        SRC_LED1_OFF;
        Delay_Ms(50);
        SRC_LED1_ON;
        Delay_Ms(50);
    }
    
    while (1)
    {
    }
}


#ifdef  USE_FULL_ASSERT

/**
  * @brief  Reports the name of the source file and the source line number
  *         where the assert_param error has occurred.
  * @param  file: pointer to the source file name
  * @param  line: assert_param error line source number
  * @retval None
  */
void assert_failed(uint8_t *file, uint32_t line)
{
    /* User can add his own implementation to report the file name and line number,
       ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */

    /* Infinite loop */
    while (1)
    {
    }
}
#endif
